package a.f.d.a;

import a.c.e;
import a.c.m;
import a.c.x;
import a.f.o;
import a.i.db;

class bb
  implements v
{
  double a;
  private x b;
  
  public void a(double paramDouble)
  {
    this.a = paramDouble;
  }
  
  public void a(o paramo, ac paramac, bc parambc)
  {
    this.b = db.a(new double[paramo.j()]);
    a(paramo, paramac, parambc, this.b);
  }
  
  public void b(o paramo, ac paramac, bc parambc)
  {
    this.b = null;
  }
  
  private void a(o paramo, ac paramac, bc parambc, x paramx)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.d[] arrayOfd1 = new a.c.d[paramo.l()];
    a.c.d[] arrayOfd2 = new a.c.d[paramo.l()];
    m localm = paramo.w();
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        arrayOfd1[localm.a().d()] = localm.a();
        arrayOfd2[localm.a().d()] = localm.a();
        localm.f();
      } while (!bool1);
    } while (bool2);
    int i = 0;
    a.c.v localv;
    Object localObject1;
    Object localObject2;
    Object localObject3;
    Object localObject4;
    label292:
    label294:
    label304:
    label307:
    do
    {
      if (i >= paramac.a()) {
        break;
      }
      if (bool1) {
        break label473;
      }
      localv = paramac.a(i).c().f();
      do
      {
        if (localv == null) {
          break label425;
        }
        localObject1 = (e)localv.c();
        paramx.a(localObject1, -1.0D);
        localObject2 = parambc.a((e)localObject1);
        if (bool1) {
          break;
        }
        if (((ec)localObject2).d() != 1)
        {
          localObject3 = ((e)localObject1).i();
          e locale;
          do
          {
            if (localObject3 == null) {
              break;
            }
            localObject4 = localObject3;
            if (bool2) {
              break label307;
            }
            if (bool1) {
              break label304;
            }
            locale = ((a.c.d)localObject4).e();
            if (parambc.a(locale).d() == 1)
            {
              localObject4 = locale.i();
              arrayOfd2[localObject4.d()] = localObject3;
            }
            while (bool2)
            {
              locale = ((a.c.d)localObject4).e();
              if (bool2) {
                break label294;
              }
              if (bool1) {
                break label292;
              }
              if (!bool1) {
                break;
              }
            }
            localObject3 = ((a.c.d)localObject3).j();
          } while (!bool1);
          if (!bool2) {
            localObject3 = ((e)localObject1).h();
          }
          do
          {
            if (localObject3 == null) {
              break;
            }
            localObject4 = localObject3;
            if (bool2) {
              break label505;
            }
            if (bool1) {
              break label493;
            }
            locale = ((a.c.d)localObject4).f();
            if (parambc.a(locale).d() == 1)
            {
              localObject4 = locale.h();
              arrayOfd1[localObject4.d()] = localObject3;
            }
            while (bool2)
            {
              locale = ((a.c.d)localObject4).f();
              if (bool2) {
                break label405;
              }
              if (bool1) {
                break label403;
              }
              if (!bool1) {
                break;
              }
            }
            localObject3 = ((a.c.d)localObject3).i();
          } while (!bool1);
        }
        localv = localv.a();
        if (bool2) {
          break label878;
        }
      } while (!bool1);
      i++;
    } while ((!bool2) && (!bool1));
    label403:
    label405:
    label425:
    if (!bool2) {
      i = 0;
    }
    label473:
    label493:
    label505:
    while (!bool1) {
      do
      {
        if (i >= paramac.a()) {
          break;
        }
        localv = paramac.a(i).c().f();
        if (!bool2)
        {
          if (localv != null)
          {
            localObject1 = (e)localv.c();
            localObject2 = parambc.a((e)localObject1);
            localv = localv.a();
            do
            {
              if (localv == null) {
                break label868;
              }
              localObject3 = (e)localv.c();
              localObject4 = parambc.a((e)localObject3);
              if (bool1) {
                break;
              }
              if (a((ec)localObject4, (ec)localObject2))
              {
                int j = 0;
                a.c.d locald1;
                a.c.d locald2;
                double d1;
                if (!bool2)
                {
                  if (((e)localObject3).d() == 1)
                  {
                    if (bool2) {
                      break label685;
                    }
                    if (((e)localObject1).d() == 1)
                    {
                      locald1 = ((e)localObject1).i();
                      locald2 = ((e)localObject3).i();
                      locald1 = arrayOfd1[locald1.d()];
                      locald2 = arrayOfd1[locald2.d()];
                      if (bool2) {
                        break label676;
                      }
                      if (locald1.e() == locald2.e())
                      {
                        d1 = Math.abs(paramo.p(locald1).a - paramo.p(locald2).a);
                        paramx.a(localObject1, d1);
                        j = 1;
                      }
                    }
                  }
                  if (bool2) {
                    continue;
                  }
                }
                if (((e)localObject3).e() == 1)
                {
                  if (bool2) {
                    continue;
                  }
                  if (((e)localObject1).e() == 1)
                  {
                    locald1 = ((e)localObject1).h();
                    locald2 = ((e)localObject3).h();
                    locald1 = arrayOfd2[locald1.d()];
                    locald2 = arrayOfd2[locald2.d()];
                    if (bool2) {
                      break label850;
                    }
                    if (locald1.f() == locald2.f())
                    {
                      d1 = Math.abs(paramo.q(locald1).a - paramo.q(locald2).a);
                      if (j != 0)
                      {
                        double d2 = paramx.getDouble(localObject1);
                        d1 = Math.max(d1, d2);
                        if (bool2) {
                          continue;
                        }
                        if (d1 < d2)
                        {
                          paramx.a(localObject1, d1);
                          if (bool2) {
                            continue;
                          }
                          if (!bool1) {}
                        }
                      }
                      else
                      {
                        paramx.a(localObject1, d1);
                      }
                    }
                  }
                }
              }
              localObject1 = localObject3;
              localObject2 = localObject4;
              localv = localv.a();
            } while (!bool1);
          }
          i++;
        }
      } while (bool2);
    }
    label676:
    label685:
    label850:
    label868:
    label878:
    return;
  }
  
  private boolean a(ec paramec1, ec paramec2)
  {
    boolean bool = d.R;
    if (!bool) {
      switch (paramec1.d())
      {
      case 4: 
      case 5: 
      case 6: 
      case 7: 
      default: 
        return false;
      }
    }
    if (!bool) {
      switch (paramec2.d())
      {
      case 4: 
      case 5: 
      case 6: 
      case 7: 
      default: 
        return false;
      }
    }
    return true;
  }
  
  public double a(o paramo, vb paramvb, bc parambc, e parame1, e parame2)
  {
    if ((d.R) || ((parame1 == null) || (parame2 == null))) {
      return 0.0D;
    }
    return this.b.getDouble(parame1);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.bb

 * JD-Core Version:    0.7.0.1

 */